package com.automannn.practice.mybatis.mappedStatement;

import org.apache.ibatis.builder.StaticSqlSource;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlCommandType;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.session.Configuration;

/**
 * @author chenkh
 * @time 2021/10/26 15:08
 */
public class MappedStatementTest {

    public static void main(String[] args) {
        Configuration configuration = new Configuration();
        SqlSource sqlSource = new StaticSqlSource(configuration,"select * from person");
        MappedStatement mappedStatement = new MappedStatement.Builder(configuration,"myMethod",sqlSource, SqlCommandType.SELECT).build();
        System.out.println(mappedStatement);
    }
}
